import { createApp } from 'vue';
import App from './App.vue';
import router from '@/router';
import '@/router/permission';
import { permission, permissionCover } from '@/common/directive';
import { setupStore } from '@/store';
import { setupI18n } from '@/common/lang';

/*初始化页面css*/
import 'normalize.css/normalize.css';
/*公共css*/
import '@/styles/common.scss';
/*svg相关*/
import svgIcon from '@/components/SvgIcon/index.vue';
import 'virtual:svg-icons-register';

/*初始挂载*/
let app = createApp(App);
app.directive('permission', permission);
app.directive('permissionCover', permissionCover);
app.component('svg-icon', svgIcon);
setupStore(app);
setupI18n((i18n) => {
    app.use(i18n);
    app.use(router);
    app.mount('#app');
});


